﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RBAC_Uthorization.Domain.Entity
{
    /// <summary>
    /// 系统用户表
    /// </summary>
    [Table("sys_user")]
    public class sys_user:Audit
    {
        /// <summary>
        /// 编号
        /// </summary>
        [Key]
        public int id { get; set; }
        /// <summary>
        /// 系统编号
        /// </summary>
        public string sys_id { get; set; }
        /// <summary>
        /// 公司id
        /// </summary>
        public string offic_id { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        
        public string login_name { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string password { get; set; }
        /// <summary>
        /// 工号
        /// </summary>
        public string? no { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        public string? name { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        public string? email { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        public string? phone { get; set; }
        /// <summary>
        /// 用户类型
        /// </summary>
        public int user_type { get; set; }=0;
        /// <summary>
        /// 性别
        /// </summary>
        public int Sex { get; set; } = 0;
        /// <summary>
        /// 管理员类型
        /// </summary>
        public int mgr_type { get; set; }= 0;
        /// <summary>
        /// 用户头像
        /// </summary>
        public string? avatar { get; set; }
        /// <summary>
        /// 过期时间
        /// </summary>
        
        ///登录次数
        public int login_count { get; set; } = 0;
        /// <summary>
        /// 结束封禁时间
        /// </summary>
        public DateTime? lock_time { get; set; }
        /// <summary>
        /// 最后登录ip
        /// </summary>
        public string? login_ip { get; set; }
        /// <summary>
        /// 最后登录时间
        /// </summary>
        public DateTime? login_date { get; set; }
      
        /// <summary>
        /// 是否可登录
        /// </summary>
        public int login_flag { get; set; } = 1;



    }
}
